﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SevenWizards1.CoreComponents;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace SevenWizards1.SpriteClasses
{
    class ItemSprite : Sprite
    {
        /* position vector is measured in tiles, not pixels*/
        public ItemSprite(Game game, Texture2D texture, Vector2 position)
            : base(game, texture)
        {
            this.position = position;
        }

        public override void Draw(GameTime gameTime)
        {
            spriteBatch.Draw(texture,
                new Rectangle((int)position.X * TileEngine.TileWidth
                        - TileEngine.CameraXPosition,
                    (int)position.Y * TileEngine.TileHeight
                        - TileEngine.CameraYPositon,
                    TileEngine.TileWidth,
                    TileEngine.TileHeight),
                    Color.White);

            base.Draw(gameTime);
        }
    }
}